**** OPEN OUTPUT LOG FILE  *****


log using "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\OUTPUT\Performance Management.APPENDIX B MODELS.04-10-2025.smcl", replace 




********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************






**** TABLE B1 -- MODELS B1-B3: "TASK COMPLEXITY, ORGANIZATIONAL ADAPTATION & PROGRAM ERROR RATES" APPENDIX B STATISTICAL ANALYSES [APRIL 2025]: ORGANIZATIONAL ADAPTATION EFFECTS ON PROGRAM PAYMENT ERROR RATES [TOTAL PROGRAM ERROR RATE] **** 


** (MODEL B1; FIGURES B1A-B1C; MODEL B2: FIGURES B2A-B2C; MODEL B3: FIGURES B2D-B2F) **





****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************





*** MODELS PREDICTING VARIOPUS TYPE OF PROGRAM ERROR RATES BASED ON BAM SAMPLING RATES ***





*** MODEL 1: OVERALL ERROR RATE: (SAMPLE WEIGHTED) ***

*  [# overpayment errors / paid claims sample] + [# underpayment errors / paid claims sample] + [# erroneous denials / denied claims sample] + [# underpayment errors / denied claims sample] *



*** MODEL 2: ABSOLUTE TYPE I ERROR RATE ***

* [overpayment error rate / paid claims sample] *




*** MODEL 3: RELATIVE TYPE I ERROR RATE:  {TYPE I ERROR RATE /  [TYPE I ERROR RATE + TYPE II ERROR RATE]}      (SAMPLE WEIGHTED)  ***

*  {[overpayment error rate / paid claims sample]   /  [overpayment error rate / paid claims sample]   +  [underpayment error rate / paid claims sample]  +  [erroneous denial / denied claims sample]  +  [underpayment error / denied claims sample]}  *






**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************








*** APPENDIX B MODELS: ANALYZING SENSITIVITY OF MANUSCRIPT MODEL ESTIMATES -- INCLUSION OF ONLY STATE, YEAR, AND STATE ADOPTION YEAR COHORT*TREATMENT UNIT EFFECT INDICATORS AS COVARIATES ///
***                    --I.E., OMIT ADDITIONAL CONTROL COVARIATES ***






********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************




*** RETRIEVE MANUSCRIPT MODELS DATABASE [as of 04-10-2025] ***


use "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\DATA\Performance Management.MANUSCRIPT DATABASE.04-10-2025.dta", replace




*** SET DATA TO PANEL STRUCTURE  ***

xtset stateid monthyear, monthly

*
*
*
*


*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************





*** TESTING H1 & H3: TOTAL/OVERALL PROGRAM E0RROR RATE ORGANIZATIONAL ADAPTATION HYPOTHESES  ***



*** ESTIMATE MODEL B1: TOTAL PROGRAM ERROR  RATE [MODEL 1 omitting ADDITIONAL COVARIATES: PROPORTION OF SAMPLE-WEIGHTED CASES OF TOTAL ERRORS VIA WEEKLY BAM SURVEY AGGREGATED TO MONTHLY OBSERVATIONS: [CONTROLS, PLUS STATE, YEAR, & YEAR-ADOPTION COHORT*TREATMENT UNIT EFFECTS] *** 	(MODEL B1: FIGURES B1A-B1C) 


npregress series   totalerror_rat  itmod_monthcount  i.tot_interstate_cat  i.tot_diffoccupseek_cat  if itmod_adopt_state==1, asis(i.stateid i.year adoptcohort_2002_itadopt  adoptcohort_2004_itadopt  adoptcohort_2006_itadopt adoptcohort_2007_itadopt   adoptcohort_2009_itadopt  adoptcohort_2010_itadopt  adoptcohort_2013_itadopt  adoptcohort_2014_itadopt  adoptcohort_2015_itadopt  adoptcohort_2016_itadopt  adoptcohort_2017_itadopt  adoptcohort_2018_itadopt  adoptcohort_2020_itadopt  adoptcohort_2021_itadopt)  vce(bootstrap, seed(123) rep(1000))


** COMPUTE PSEUDO R^2 [SSE / (SSE + SSR) = EXPLAINED/PREDICTED SUM OF SQUARES / (EXPLAINED/PREDICTED SUM OF SQUARES + RESIDUAL SUM OF SQUARES)] = SSE / SST

predict predsy_m1b if e(sample)
predict residsy_m1b if e(sample), residuals

gen sse_m1b = predsy_m1b * predsy_m1b if e(sample)
gen ssr_m1b = residsy_m1b * residsy_m1b if e(sample)

egen sum_sse_m1b = total(sse_m1b) if e(sample)
egen sum_ssr_m1b = total(ssr_m1b) if e(sample)

gen r2_m1b = sum_ssr_m1b/(sum_sse_m1b + sum_ssr_m1b)

sum r2_m1b

*
*
*
*
*

* [MODEL B1: TOTAL PROGRAM ERROR RATE] FIGURE B1A:  UNCONDITIONAL ADAPTATION EFFECTS -- E(Y) [WITH RESPECT TO MONTHS SINCE ADOPTION (t + k) : 0 1 6 12.....60] 

margins, at(itmod_monthcount=(0 1 6 12 18 24 30 36 42 48 54 60))

marginsplot, recast(connected) ciopt(color(%40)) recastci(rarea) ///
legend(on order(1 "Unconditional Adaptation") pos(6) ring(2) cols(2) size(9pt))  ///
title(" {bf:FIGURE B1A}""{bf:Unconditional Adaptation Effect}" "{bf:(Total Program Error Rate [MODEL B1])}", size(10pt) linegap(0.7) margin(t+1 b+2 r-6)) ///
xtitle("Months since IT Reform", size(10pt) margin(t+2 b+2)) ///
ytitle("Total Program Error Rate", size(10pt) margin(r+2)) ///
xlabel(0 "0" 1 "1" 6 "6" 12 "12" 18 "18" 24 "24" 30 "30" 36 "36" 42 "42" 48 "48" 54 "54" 60 "60", labsize(9pt) ) ///
ylabel(, labsize(9pt) format(%9.2f) angle(0)) xsize(6)
*
*
graph save "Graph" "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\GRAPHICS\marginsplot.Model B1.FIGURE B1A.04-10-2025.gph", replace

*
*
*

* [MODEL B1: TOTAL PROGRAM ERROR RATE] FIGURE B1B: MARGINAL DIFFERENTIAL EFFECT BETWEEN HIGH TASK COMPLEXITY (tot_interstate_cat==2) & LOW COMPLEXITY (tot_interstate_cat==0) VALUES [WITH RESPECT TO MONTHS SINCE ADOPTION (t + k) : 0 1 6 12.....60]: ***

margins r.tot_interstate_cat if tot_interstate_cat==0|tot_interstate_cat==2, at(itmod_monthcount=(0 1 6 12 18 24 30 36 42 48 54 60))

marginsplot, recast(connected) ciopt(color(%40)) recastci(rarea) /// 
yline(0, lcolor(%40gs) lpattern(shortdash)) ///
legend(on order(1 "High Task Complexity - Low Task Complexity") pos(6) ring(2) cols(2) size(10pt))  ///
title(" {bf:FIGURE B1B}""{bf:Conditional Adaptation Maiginal Effect By Task Complexity}" "{bf:(Interstate Claims: Total Program Error Rate [MODEL B1])}", size(10pt) linegap(0.7) margin(t+1 b+1 r-6)) ///
xtitle("Months since IT Reform", size(10pt) margin(t+2 b+2)) ///
ytitle("Total Program Error Rate", size(10pt) margin(r+2)) ///
xlabel(0 "0" 1 "1" 6 "6" 12 "12" 18 "18" 24 "24" 30 "30" 36 "36" 42 "42" 48 "48" 54 "54" 60 "60", labsize(9pt) ) ///
ylabel(, labsize(9pt) format(%9.2f) angle(0)) xsize(6)
*
*
*
graph save "Graph" "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\GRAPHICS\marginsplot.Model B1.FIGURE B1B.04-10-2025.gph", replace
*
*
*

* [MODEL B1: TOTAL PROGRAM ERROR RATE] FIGURE B1C:  MARGINAL DIFFERENTIAL EFFECT BETWEEN HIGH TASK COMPLEXITY (tot_diffoccupseek_cat==2) & LOW COMPLEXITY (tot_extbenefits_cat==0) VALUES [WITH RESPECT TO MONTHS SINCE ADOPTION (t + k) : 0 1 6 12.....60]: ***

margins r.tot_diffoccupseek_cat if tot_diffoccupseek_cat==0|tot_diffoccupseek_cat==2, at(itmod_monthcount=(0 1 6 12 18 24 30 36 42 48 54 60))

marginsplot, recast(connected) ciopt(color(%40)) recastci(rarea) /// 
yline(0, lcolor(%40gs) lpattern(shortdash)) ///
legend(on order(1 "High Task Complexity - Low Task Complexity") pos(6) ring(2) cols(2) size(10pt))  ///
title(" {bf:FIGURE B1C}""{bf:Conditional Adaptation Marginal Effect By Task Complexity}" "{bf:(Seeking Different Occupation: Total Program Error Rate [MODEL B1])}", size(10pt) linegap(0.7) margin(t+1 b+1 r-6)) ///
xtitle("Months since IT Reform", size(10pt) margin(t+2 b+2)) ///
ytitle("Total Program Error Rate", size(10pt) margin(r+2)) ///
xlabel(0 "0" 1 "1" 6 "6" 12 "12" 18 "18" 24 "24" 30 "30" 36 "36" 42 "42" 48 "48" 54 "54" 60 "60", labsize(9pt) ) ///
ylabel(, labsize(9pt) format(%9.2f) angle(0)) xsize(6)
*
*
*
graph save "Graph" "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\GRAPHICS\marginsplot.Model B1.FIGURE B1C.04-10-2025.gph", replace



******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************




*** TESTING H2 & H4: ABSOLUTE TYPE I ERROR RATE ORGANIZATIONAL ADAPTATION  ***




*** ESTIMATE MODEL B2: ABSOLUTE TYPE I ERROR RATE [MODEL 2 omitting ADDITIONAL COVARIATES: PROPORTION OF TOTAL ERRORS VIA WEEKLY BAM SURVEY AGGREGATED TO MONTHLY OBSERVATIONS: [ONLY STATE, YEAR, AND YEAR-ADOPTION COHORT*TREATMENT UNIT EFFECTS] *** 	(FIGURES B2A-B2C) 


npregress series  t1error_rat  itmod_monthcount  i.t1_interstate_cat  i.t1_diffoccupseek_cat   if itmod_adopt_state==1, asis(i.stateid i.year  adoptcohort_2002_itadopt  adoptcohort_2004_itadopt  adoptcohort_2006_itadopt adoptcohort_2007_itadopt   adoptcohort_2009_itadopt  adoptcohort_2010_itadopt  adoptcohort_2013_itadopt  adoptcohort_2014_itadopt  adoptcohort_2015_itadopt  adoptcohort_2016_itadopt  adoptcohort_2017_itadopt  adoptcohort_2018_itadopt  adoptcohort_2020_itadopt  adoptcohort_2021_itadopt)  vce(bootstrap, seed(123) rep(1000))


** COMPUTE PSEUDO R^2 [SSE / (SSE + SSR) = EXPLAINED/PREDICTED SUM OF SQUARES / (EXPLAINED/PREDICTED SUM OF SQUARES + RESIDUAL SUM OF SQUARES)] = SSE / SST

predict predsy_m2b if e(sample)
predict residsy_m2b if e(sample), residuals

gen sse_m2b = predsy_m2b * predsy_m2b if e(sample)
gen ssr_m2b = residsy_m2b * residsy_m2b if e(sample)

egen sum_sse_m2b = total(sse_m2b) if e(sample)
egen sum_ssr_m2b = total(ssr_m2b) if e(sample)

gen r2_m2b = sum_ssr_m2b/(sum_sse_m2b + sum_ssr_m2b)

sum r2_m2b

*
*
*
* [MODEL B2: ABSOLUTE TYPE I ERROR RATE] FIGURE B2A:  UNCONDITIONAL ADAPTATION EFFECTS -- E(Y) [WITH RESPECT TO MONTHS SINCE ADOPTION (t + k) : 0 1 6 12.....60]

margins, at(itmod_monthcount=(0 1 6 12 18 24 30 36 42 48 54 60))

marginsplot, recast(connected) ciopt(color(%40)) recastci(rarea) ///
legend(on order(1 "Unconditional Adaptation") pos(6) ring(2) cols(2) size(9pt))  ///
title(" {bf:FIGURE B2A}""{bf:Unconditional Adaptation Effect}" "{bf:(Absolute Type I Program Error Rate [MODEL B2])}", size(10pt) linegap(0.7) margin(t+1 b+2 r-6)) ///
xtitle("Months since IT Reform", size(10pt) margin(t+2 b+2)) ///
ytitle("Absolute Type I Program Error Rate", size(10pt) margin(r+2)) ///
xlabel(0 "0" 1 "1" 6 "6" 12 "12" 18 "18" 24 "24" 30 "30" 36 "36" 42 "42" 48 "48" 54 "54" 60 "60", labsize(9pt) ) ///
ylabel(, labsize(9pt) format(%9.2f) angle(0)) xsize(6)
*
*
graph save "Graph" "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\GRAPHICS\marginsplot.Model B2.FIGURE B2A.04-10-2025.gph", replace

*
*
*
* [MODEL B2: ABSOLUTE TYPE I ERROR RATE] FIGURE B2B:  MARGINAL DIFFERENTIAL EFFECT BETWEEN HIGH TASK COMPLEXITY (t1_interstate_cat==2) & LOW COMPLEXITY (t1_interstate_cat==0) VALUES [WITH RESPECT TO MONTHS SINCE ADOPTION (t + k) : 0 1 6 12.....60]: ***

margins r.t1_interstate_cat if t1_interstate_cat==0|t1_interstate_cat==2, at(itmod_monthcount=(0 1 6 12 18 24 30 36 42 48 54 60))

marginsplot, recast(connected) ciopt(color(%40)) recastci(rarea) /// 
yline(0, lcolor(%40gs) lpattern(shortdash)) ///
legend(on order(1 "High Task Complexity - Low Task Complexity") pos(6) ring(2) cols(2) size(10pt))  ///
title(" {bf:FIGURE B2B}""{bf:Conditional Adaptation Marginal Effect By Task Complexity}" "{bf:(Interstate Claims: Absolute Type I Program Error Rate [MODEL B2])}", size(10pt) linegap(0.7) margin(t+1 b+1 r-6)) ///
xtitle("Months since IT Reform", size(10pt) margin(t+2 b+2)) ///
ytitle("Absolute Type I Program Error Rate", size(10pt) margin(r+2)) ///
xlabel(0 "0" 1 "1" 6 "6" 12 "12" 18 "18" 24 "24" 30 "30" 36 "36" 42 "42" 48 "48" 54 "54" 60 "60", labsize(9pt) ) ///
ylabel(, labsize(9pt) format(%9.2f) angle(0)) xsize(6)
*
*
*
graph save "Graph" "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\GRAPHICS\marginsplot.Model B2.FIGURE B2B.04-10-2025.gph", replace
*
*
*
*
* [MODEL B2: ABSOLUTE TYPE I ERROR RATE] FIGURE B2C: MARGINAL DIFFERENTIAL EFFECT BETWEEN HIGH TASK COMPLEXITY (t1_diffoccupseek_cat==2) & LOW COMPLEXITY (t1_diffoccupseek_cat==0) VALUES [WITH RESPECT TO MONTHS SINCE ADOPTION (t + k) : 0 1 6 12.....60]: ***

margins r.t1_diffoccupseek_cat if t1_diffoccupseek_cat==0|t1_diffoccupseek_cat==2, at(itmod_monthcount=(0 1 6 12 18 24 30 36 42 48 54 60))

marginsplot, recast(connected) ciopt(color(%40)) recastci(rarea) /// 
yline(0, lcolor(%40gs) lpattern(shortdash)) ///
legend(on order(1 "High Task Complexity - Low Task Complexity") pos(6) ring(2) cols(2) size(10pt))  ///
title(" {bf:FIGURE B2C}""{bf:Conditional Adaptation Marginal Effect By Task Complexity}" "{bf:(Seeking Different Occupation: Absolute Type I Program Error Rate [MODEL B2])}", size(10pt) linegap(0.7) margin(t+1 b+1 r-6)) ///
xtitle("Months since IT Reform", size(10pt) margin(t+2 b+2)) ///
ytitle("Absolute Type I Program Error Rate", size(10pt) margin(r+2)) ///
xlabel(0 "0" 1 "1" 6 "6" 12 "12" 18 "18" 24 "24" 30 "30" 36 "36" 42 "42" 48 "48" 54 "54" 60 "60", labsize(9pt) ) ///
ylabel(#3, labsize(9pt) format(%9.2f) angle(0)) xsize(6)
*
*
*
graph save "Graph" "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\GRAPHICS\marginsplot.Model B2.FIGURE B2C.04-10-2025.gph", replace



*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************





*** TESTING H2 & H4: RELATIVE TYPE I ERROR RATE [TYPE I ERROR RATE / (TYPE I ERROR RATE + TYPE II ERROR RATE)] ORGANIZATIONAL ADAPTATION ***




*** ESTIMATE MODEL B3: RELATIVE TYPE I ERROR RATE [MODEL 3 omitting ADDITIONAL COVARIATES: PROPORTION OF SAMPLE-WEIGHTED CASES OF TOTAL ERRORS VIA WEEKLY BAM SURVEY AGGREGATED TO MONTHLY OBSERVATIONS: [ONLY STATE, YEAR, AND YEAR-ADOPTION COHORT*TREATMENT UNIT EFFECTS] ***  (FIGURES B2D-B2F) 



npregress series  relt1error_rat  itmod_monthcount  i.relt1_interstate_cat i.relt1_diffoccupseek_cat  if itmod_adopt_state==1, asis(i.stateid i.year  adoptcohort_2002_itadopt  adoptcohort_2004_itadopt  adoptcohort_2006_itadopt adoptcohort_2007_itadopt   adoptcohort_2009_itadopt  adoptcohort_2010_itadopt  adoptcohort_2013_itadopt  adoptcohort_2014_itadopt  adoptcohort_2015_itadopt  adoptcohort_2016_itadopt  adoptcohort_2017_itadopt  adoptcohort_2018_itadopt  adoptcohort_2020_itadopt  adoptcohort_2021_itadopt)  vce(bootstrap, seed(123) rep(1000))


** COMPUTE PSEUDO R^2 [SSE / (SSE + SSR) = EXPLAINED/PREDICTED SUM OF SQUARES / (EXPLAINED/PREDICTED SUM OF SQUARES + RESIDUAL SUM OF SQUARES)] = SSE / SST

predict predsy_m3b if e(sample)
predict residsy_m3b if e(sample), residuals

gen sse_m3b = predsy_m3b * predsy_m3b if e(sample)
gen ssr_m3b = residsy_m3b * residsy_m3b if e(sample)

egen sum_sse_m3b = total(sse_m3b) if e(sample)
egen sum_ssr_m3b = total(ssr_m3b) if e(sample)

gen r2_m3b = sum_ssr_m3b/(sum_sse_m3b + sum_ssr_m3b)

sum r2_m3b

*
*
*
*
* [MODEL B3: RELATIVE TYPE I ERROR RATE] FIGURE B2D:  UNCONDITIONAL ADAPTATION EFFECTS -- E(Y) [WITH RESPECT TO MONTHS SINCE ADOPTION (t + k) : 0 1 6 12.....60]

margins, at(itmod_monthcount=(0 1 6 12 18 24 30 36 42 48 54 60))

marginsplot, recast(connected) ciopt(color(%40)) recastci(rarea) ///
legend(on order(1 "Unconditional Adaptation") pos(6) ring(2) cols(2) size(9pt))  ///
title(" {bf:FIGURE B2D}""{bf:Unconditional Adaptation Effect}" "{bf:(Relative Type I Program Error Rate [MODEL B3])}", size(10pt) linegap(0.7) margin(t+1 b+2 r-6)) ///
xtitle("Months since IT Reform", size(10pt) margin(t+2 b+2)) ///
ytitle("Relative Type I Program Error Rate", size(10pt) margin(r+2)) ///
xlabel(0 "0" 1 "1" 6 "6" 12 "12" 18 "18" 24 "24" 30 "30" 36 "36" 42 "42" 48 "48" 54 "54" 60 "60", labsize(9pt) ) ///
ylabel(, labsize(9pt) format(%9.2f) angle(0)) xsize(6)
*
*
graph save "Graph" "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\GRAPHICS\marginsplot.Model B3.FIGURE B2D.04-10-2025.gph", replace

*
*
* [MODEL B3: RELATIVE TYPE I ERROR RATE] FIGURE B2E:  MARGINAL DIFFERENTIAL EFFECT BETWEEN HIGH TASK COMPLEXITY (relt1_interstate_cat==2) & LOW COMPLEXITY (relt1_interstate_cat==0) VALUES [WITH RESPECT TO MONTHS SINCE ADOPTION (t + k) : 0 1 6 12.....60]: ***

margins r.relt1_interstate_cat if relt1_interstate_cat==0|relt1_interstate_cat==2, at(itmod_monthcount=(0 1 6 12 18 24 30 36 42 48 54 60))

marginsplot, recast(connected) ciopt(color(%40)) recastci(rarea) /// 
yline(0, lcolor(%40gs) lpattern(shortdash)) ///
legend(on order(1 "High Task Complexity - Low Task Complexity") pos(6) ring(2) cols(2) size(10pt))  ///
title(" {bf:FIGURE B2E}""{bf:Conditional Adaptation Marginal Effect By Task Complexity}" "{bf:(Interstate Claims: Relative Type I Program Error Rate [MODEL B3])}", size(10pt) linegap(0.7) margin(t+1 b+1 r-6)) ///
xtitle("Months since IT Reform", size(10pt) margin(t+2 b+2)) ///
ytitle("Relative Type I Program Error Rate", size(10pt) margin(r+2)) ///
xlabel(0 "0" 1 "1" 6 "6" 12 "12" 18 "18" 24 "24" 30 "30" 36 "36" 42 "42" 48 "48" 54 "54" 60 "60", labsize(9pt) ) ///
ylabel(, labsize(9pt) format(%9.2f) angle(0)) xsize(6)
*
*
*
graph save "Graph" "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\GRAPHICS\marginsplot.Model B3.FIGURE B2E.04-10-2025.gph", replace
*
*
*
*
* [MODEL B3: RELATIVE TYPE I ERROR RATE] FIGURE B2F:  MARGINAL DIFFERENTIAL EFFECT BETWEEN HIGH TASK COMPLEXITY (relt1_diffoccupseek_cat==2) & LOW COMPLEXITY (relt1_extbenefits_cat==0) VALUES [WITH RESPECT TO MONTHS SINCE ADOPTION (t + k) : 0 1 6 12.....60]: ***

margins r.relt1_diffoccupseek_cat if relt1_diffoccupseek_cat==0|relt1_diffoccupseek_cat==2, at(itmod_monthcount=(0 1 6 12 18 24 30 36 42 48 54 60))

marginsplot, recast(connected) ciopt(color(%40)) recastci(rarea) /// 
yline(0, lcolor(%40gs) lpattern(shortdash)) ///
legend(on order(1 "High Task Complexity - Low Task Complexity") pos(6) ring(2) cols(2) size(10pt))  ///
title(" {bf:FIGURE B2F}""{bf:Conditional Adaptation Marginal Effect By Task Complexity}" "{bf:(Seeking Different Occupation: Relative Type I Program Error Rate [MODEL B3])}", size(10pt) linegap(0.7) margin(t+1 b+1 r-6)) ///
xtitle("Months since IT Reform", size(10pt) margin(t+2 b+2)) ///
ytitle("Relative Type I Program Error Rate", size(10pt) margin(r+2)) ///
xlabel(0 "0" 1 "1" 6 "6" 12 "12" 18 "18" 24 "24" 30 "30" 36 "36" 42 "42" 48 "48" 54 "54" 60 "60", labsize(9pt) ) ///
ylabel(, labsize(9pt) format(%9.2f) angle(0)) xsize(6)
*
*
*
graph save "Graph" "C:\Users\gk57526\Dropbox\Administration of UI Programs in the American States (Ji-Hyeun Hong)\Performance Management Project (Paper #3)\EMPIRICS\GRAPHICS\marginsplot.Model B3.FIGURE B2F.04-10-2025.gph", replace



******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************



log close
